let sx = document.getElementById("sx")
let sy = document.getElementById("sy")
let px = document.getElementById("px")
let py = document.getElementById("py")
let cx = document.getElementById("cx")
let cy = document.getElementById("cy")
let sly = document.getElementById("sly")
let ox = document.getElementById("ox")
let oy = document.getElementById("oy")

let show = document.querySelector(".show")
let sh1 = document.querySelectorAll(".sh1")
let sh2 = document.querySelectorAll(".sh2")
let sh3 = document.querySelectorAll(".sh3")
let sh4 = document.querySelectorAll(".sh4")
let sh5 = document.querySelectorAll(".sh5")

document.addEventListener("mousemove", function (e) {
    sx.value = e.screenX
    sy.value = e.screenY
    px.value = e.pageX
    py.value = e.pageY
    cx.value = e.clientX
    cy.value = e.clientY
    ox.value = e.offsetX
    oy.value = e.offsetY
    getPosition()
}, false)
document.addEventListener("scroll", function (e) {
    sly.value = window.scrollY
    getPosition()
})

function getPosition() {
    sh1[0].innerHTML = show.offsetWidth
    sh1[1].innerHTML = show.offsetHeight
    sh1[2].innerHTML = show.offsetLeft
    sh1[3].innerHTML = show.offsetTop

    sh2[0].innerHTML = show.scrollWidth
    sh2[1].innerHTML = show.scrollHeight
    sh2[2].innerHTML = parseInt(document.documentElement.scrollLeft)
    sh2[3].innerHTML = parseInt(document.documentElement.scrollTop)

    sh3[0].innerHTML = show.clientWidth
    sh3[1].innerHTML = show.clientHeight
    sh3[2].innerHTML = show.clientLeft
    sh3[3].innerHTML = show.clientTop

    sh4[0].innerHTML = (show.pageWidth + "").slice(0, 1)
    sh4[1].innerHTML = (show.pageHeight + "").slice(0, 1)
    sh4[2].innerHTML = parseInt(window.pageXOffset)
    sh4[3].innerHTML = parseInt(window.pageYOffset)

    sh5[0].innerHTML = (show.screenWidth + "").slice(0, 1)
    sh5[1].innerHTML = (show.screenHeight + "").slice(0, 1)
    sh5[2].innerHTML = window.screenX
    sh5[3].innerHTML = window.screenY
}
getPosition()